home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / GXLayout.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  13.4 KB  |  401 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        GXLayout.h
  3.  
  4.      Contains:    QuickDraw GX layout routine interfaces.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __GXLAYOUT__
  19. #define __GXLAYOUT__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24. #ifndef __GXTYPES__
  25. #include <GXTypes.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. #if defined(__MWERKS__) && TARGET_CPU_68K
  51.     #pragma push
  52.     #pragma pointers_in_D0
  53. #endif
  54.  
  55. EXTERN_API_C( gxShape )
  56. GXNewLayout                        (long                     textRunCount,
  57.                                  const short             textRunLengths[],
  58.                                  const void *            text[],
  59.                                  long                     styleRunCount,
  60.                                  const short             styleRunLengths[],
  61.                                  const gxStyle             styles[],
  62.                                  long                     levelRunCount,
  63.                                  const short             levelRunLengths[],
  64.                                  const short             levels[],
  65.                                  const gxLayoutOptions * layoutOptions,
  66.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0000, 0xA832);
  67.  
  68. EXTERN_API_C( long )
  69. GXGetLayout                        (gxShape                 layout,
  70.                                  void *                    text,
  71.                                  long *                    styleRunCount,
  72.                                  short                     styleRunLengths[],
  73.                                  gxStyle                 styles[],
  74.                                  long *                    levelRunCount,
  75.                                  short                     levelRunLengths[],
  76.                                  short                     levels[],
  77.                                  gxLayoutOptions *        layoutOptions,
  78.                                  gxPoint *                position)                            THREEWORDINLINE(0x303C, 0x0001, 0xA832);
  79.  
  80. EXTERN_API_C( void )
  81. GXSetLayout                        (gxShape                 layout,
  82.                                  long                     textRunCount,
  83.                                  const short             textRunLengths[],
  84.                                  const void *            text[],
  85.                                  long                     styleRunCount,
  86.                                  const short             styleRunLengths[],
  87.                                  const gxStyle             styles[],
  88.                                  long                     levelRunCount,
  89.                                  const short             levelRunLengths[],
  90.                                  const short             levels[],
  91.                                  const gxLayoutOptions * layoutOptions,
  92.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0002, 0xA832);
  93.  
  94. EXTERN_API_C( void )
  95. GXDrawLayout                    (long                     textRunCount,
  96.                                  const short             textRunLengths[],
  97.                                  const void *            text[],
  98.                                  long                     styleRunCount,
  99.                                  const short             styleRunLengths[],
  100.                                  const gxStyle             styles[],
  101.                                  long                     levelRunCount,
  102.                                  const short             levelRunLengths[],
  103.                                  const short             levels[],
  104.                                  const gxLayoutOptions * layoutOptions,
  105.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0003, 0xA832);
  106.  
  107. EXTERN_API_C( void )
  108. GXSetLayoutParts                (gxShape                 layout,
  109.                                  gxByteOffset             oldStartOffset,
  110.                                  gxByteOffset             oldEndOffset,
  111.                                  long                     newTextRunCount,
  112.                                  const short             newTextRunLengths[],
  113.                                  const void *            newText[],
  114.                                  long                     newStyleRunCount,
  115.                                  const short             newStyleRunLengths[],
  116.                                  const gxStyle             newStyles[],
  117.                                  long                     newLevelRunCount,
  118.                                  const short             newLevelRunLengths[],
  119.                                  const short             newLevels[])                            THREEWORDINLINE(0x303C, 0x0004, 0xA832);
  120.  
  121. EXTERN_API_C( void )
  122. GXSetLayoutShapeParts            (gxShape                 layout,
  123.                                  gxByteOffset             startOffset,
  124.                                  gxByteOffset             endOffset,
  125.                                  gxShape                 insert)                                THREEWORDINLINE(0x303C, 0x0005, 0xA832);
  126.  
  127. EXTERN_API_C( long )
  128. GXGetLayoutParts                (gxShape                 layout,
  129.                                  gxByteOffset             startOffset,
  130.                                  gxByteOffset             endOffset,
  131.                                  void *                    text,
  132.                                  long *                    styleRunCount,
  133.                                  short                     styleRunLengths[],
  134.                                  gxStyle                 styles[],
  135.                                  long *                    levelRunCount,
  136.                                  short                     levelRunLengths[],
  137.                                  short                     levels[])                                THREEWORDINLINE(0x303C, 0x0006, 0xA832);
  138.  
  139. EXTERN_API_C( gxShape )
  140. GXGetLayoutShapeParts            (gxShape                 layout,
  141.                                  gxByteOffset             startOffset,
  142.                                  gxByteOffset             endOffset,
  143.                                  gxShape                 dest)                                THREEWORDINLINE(0x303C, 0x0007, 0xA832);
  144.  
  145. EXTERN_API_C( long )
  146. GXGetLayoutGlyphs                (gxShape                 layout,
  147.                                  gxGlyphcode *            glyphs,
  148.                                  gxPoint                 positions[],
  149.                                  long                     advance[],
  150.                                  gxPoint                 tangents[],
  151.                                  long *                    runCount,
  152.                                  short                     styleRuns[],
  153.                                  gxStyle                 glyphStyles[])                        THREEWORDINLINE(0x303C, 0x0008, 0xA832);
  154.  
  155. EXTERN_API_C( gxByteOffset )
  156. GXHitTestLayout                    (gxShape                 layout,
  157.                                  const gxPoint *        hitDown,
  158.                                  gxHighlightType         highlightType,
  159.                                  gxLayoutHitInfo *        hitInfo,
  160.                                  gxShape                 hitTrackingArea)                    THREEWORDINLINE(0x303C, 0x0009, 0xA832);
  161.  
  162. EXTERN_API_C( gxShape )
  163. GXGetLayoutHighlight            (gxShape                 layout,
  164.                                  gxByteOffset             startOffset,
  165.                                  gxByteOffset             endOffset,
  166.                                  gxHighlightType         highlightType,
  167.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000A, 0xA832);
  168.  
  169. EXTERN_API_C( gxShape )
  170. GXGetLayoutVisualHighlight        (gxShape                 layout,
  171.                                  gxByteOffset             startOffset,
  172.                                  long                     startLeadingEdge,
  173.                                  gxByteOffset             endOffset,
  174.                                  long                     endLeadingEdge,
  175.                                  gxHighlightType         highlightType,
  176.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000B, 0xA832);
  177.  
  178. EXTERN_API_C( gxShape )
  179. GXGetLayoutCaret                (gxShape                 layout,
  180.                                  gxByteOffset             offset,
  181.                                  gxHighlightType         highlightType,
  182.                                  gxCaretType             caretType,
  183.                                  gxShape                 caret)                                THREEWORDINLINE(0x303C, 0x000C, 0xA832);
  184.  
  185. EXTERN_API_C( gxByteOffset )
  186. GXGetLayoutBreakOffset            (gxShape                 layout,
  187.                                  gxByteOffset             startOffset,
  188.                                  Fixed                     lineWidth,
  189.                                  long                     hyphenationCount,
  190.                                  const gxByteOffset     hyphenationPoints[],
  191.                                  Boolean *                startIsStaked,
  192.                                  gxByteOffset *            priorStake,
  193.                                  gxByteOffset *            nextStake)                            THREEWORDINLINE(0x303C, 0x000D, 0xA832);
  194.  
  195. EXTERN_API_C( Fixed )
  196. GXGetLayoutRangeWidth            (gxShape                 layout,
  197.                                  gxByteOffset             startOffset,
  198.                                  gxByteOffset             endOffset,
  199.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000E, 0xA832);
  200.  
  201. EXTERN_API_C( gxShape )
  202. GXNewLayoutFromRange            (gxShape                 layout,
  203.                                  gxByteOffset             startOffset,
  204.                                  gxByteOffset             endOffset,
  205.                                  const gxLayoutOptions * layoutOptions,
  206.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000F, 0xA832);
  207.  
  208. EXTERN_API_C( gxShape )
  209. GXGetCaretAngleArea                (gxShape                 layout,
  210.                                  const gxPoint *        hitPoint,
  211.                                  gxHighlightType         highlightType,
  212.                                  gxShape                 caretArea,
  213.                                  short *                returnedRise,
  214.                                  short *                returnedRun)                        THREEWORDINLINE(0x303C, 0x0010, 0xA832);
  215.  
  216. EXTERN_API_C( void )
  217. GXGetStyleBaselineDeltas        (gxStyle                 baseStyle,
  218.                                  gxBaselineType         baseType,
  219.                                  gxBaselineDeltas         returnedDeltas)                        THREEWORDINLINE(0x303C, 0x0011, 0xA832);
  220.  
  221. EXTERN_API_C( gxByteOffset )
  222. GXGetRightVisualOffset            (gxShape                 layout,
  223.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0012, 0xA832);
  224.  
  225. EXTERN_API_C( gxByteOffset )
  226. GXGetLeftVisualOffset            (gxShape                 layout,
  227.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0013, 0xA832);
  228.  
  229. EXTERN_API_C( void )
  230. GXGetCompoundCharacterLimits    (gxShape                 layout,
  231.                                  gxByteOffset             trial,
  232.                                  gxByteOffset *            minOffset,
  233.                                  gxByteOffset *            maxOffset,
  234.                                  Boolean *                onBoundary)                            THREEWORDINLINE(0x303C, 0x0014, 0xA832);
  235.  
  236. EXTERN_API_C( void )
  237. GXGetOffsetGlyphs                (gxShape                 layout,
  238.                                  gxByteOffset             trial,
  239.                                  long                     leadingEdge,
  240.                                  gxLayoutOffsetState *    offsetState,
  241.                                  unsigned short *        firstGlyph,
  242.                                  unsigned short *        secondGlyph)                        THREEWORDINLINE(0x303C, 0x0015, 0xA832);
  243.  
  244. EXTERN_API_C( void )
  245. GXGetGlyphOffset                (gxShape                 layout,
  246.                                  long                     trial,
  247.                                  long                     onLeftTop,
  248.                                  gxByteOffset *            offset,
  249.                                  Boolean *                leadingEdge,
  250.                                  Boolean *                wasRealCharacter)                    THREEWORDINLINE(0x303C, 0x0016, 0xA832);
  251.  
  252. EXTERN_API_C( void )
  253. GXGetLayoutSpan                    (gxShape                 layout,
  254.                                  Fixed *                lineAscent,
  255.                                  Fixed *                lineDescent)                        THREEWORDINLINE(0x303C, 0x0017, 0xA832);
  256.  
  257. EXTERN_API_C( void )
  258. GXSetLayoutSpan                    (gxShape                 layout,
  259.                                  Fixed                     lineAscent,
  260.                                  Fixed                     lineDescent)                        THREEWORDINLINE(0x303C, 0x0018, 0xA832);
  261.  
  262. EXTERN_API_C( Fixed )
  263. GXGetLayoutJustificationGap        (gxShape                 layout)                                THREEWORDINLINE(0x303C, 0x0279, 0xA832);
  264.  
  265. EXTERN_API_C( void )
  266. GXGetLayoutJustificationFactors    (gxShape                 layout,
  267.                                  Fixed                     constrainedFactors[],
  268.                                  Fixed                     unconstrainedFactors[])                THREEWORDINLINE(0x303C, 0x027A, 0xA832);
  269.  
  270. EXTERN_API_C( void )
  271. GXSetStyleRunControls            (gxStyle                 target,
  272.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x0019, 0xA832);
  273.  
  274. EXTERN_API_C( void )
  275. GXSetStyleRunPriorityJustOverride (gxStyle                 target,
  276.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x001A, 0xA832);
  277.  
  278. EXTERN_API_C( void )
  279. GXSetStyleRunGlyphJustOverrides    (gxStyle                 target,
  280.                                  long                     count,
  281.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x001B, 0xA832);
  282.  
  283. EXTERN_API_C( void )
  284. GXSetStyleRunGlyphSubstitutions    (gxStyle                 target,
  285.                                  long                     count,
  286.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x001C, 0xA832);
  287.  
  288. EXTERN_API_C( void )
  289. GXSetStyleRunFeatures            (gxStyle                 target,
  290.                                  long                     count,
  291.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x001D, 0xA832);
  292.  
  293. EXTERN_API_C( void )
  294. GXSetStyleRunKerningAdjustments    (gxStyle                 target,
  295.                                  long                     count,
  296.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x001E, 0xA832);
  297.  
  298. EXTERN_API_C( void )
  299. GXSetShapeRunControls            (gxShape                 target,
  300.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x001F, 0xA832);
  301.  
  302. EXTERN_API_C( void )
  303. GXSetShapeRunPriorityJustOverride (gxShape                 target,
  304.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0020, 0xA832);
  305.  
  306. EXTERN_API_C( void )
  307. GXSetShapeRunGlyphJustOverrides    (gxShape                 target,
  308.                                  long                     count,
  309.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0021, 0xA832);
  310.  
  311. EXTERN_API_C( void )
  312. GXSetShapeRunGlyphSubstitutions    (gxShape                 target,
  313.                                  long                     count,
  314.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x0022, 0xA832);
  315.  
  316. EXTERN_API_C( void )
  317. GXSetShapeRunFeatures            (gxShape                 target,
  318.                                  long                     count,
  319.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x0023, 0xA832);
  320.  
  321. EXTERN_API_C( void )
  322. GXSetShapeRunKerningAdjustments    (gxShape                 target,
  323.                                  long                     count,
  324.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x0024, 0xA832);
  325.  
  326. EXTERN_API_C( long )
  327. GXGetStyleRunControls            (gxStyle                 source,
  328.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x0025, 0xA832);
  329.  
  330. EXTERN_API_C( long )
  331. GXGetStyleRunPriorityJustOverride (gxStyle                 source,
  332.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0026, 0xA832);
  333.  
  334. EXTERN_API_C( long )
  335. GXGetStyleRunGlyphJustOverrides    (gxStyle                 source,
  336.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x0027, 0xA832);
  337.  
  338. EXTERN_API_C( long )
  339. GXGetStyleRunGlyphSubstitutions    (gxStyle                 source,
  340.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x0028, 0xA832);
  341.  
  342. EXTERN_API_C( long )
  343. GXGetStyleRunFeatures            (gxStyle                 source,
  344.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x0029, 0xA832);
  345.  
  346. EXTERN_API_C( long )
  347. GXGetStyleRunKerningAdjustments    (gxStyle                 source,
  348.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x002A, 0xA832);
  349.  
  350. EXTERN_API_C( long )
  351. GXGetShapeRunControls            (gxShape                 source,
  352.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x002B, 0xA832);
  353.  
  354. EXTERN_API_C( long )
  355. GXGetShapeRunPriorityJustOverride (gxShape                 source,
  356.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x002C, 0xA832);
  357.  
  358. EXTERN_API_C( long )
  359. GXGetShapeRunGlyphJustOverrides    (gxShape                 source,
  360.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x002D, 0xA832);
  361.  
  362. EXTERN_API_C( long )
  363. GXGetShapeRunGlyphSubstitutions    (gxShape                 source,
  364.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x002E, 0xA832);
  365.  
  366. EXTERN_API_C( long )
  367. GXGetShapeRunFeatures            (gxShape                 source,
  368.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x002F, 0xA832);
  369.  
  370. EXTERN_API_C( long )
  371. GXGetShapeRunKerningAdjustments    (gxShape                 source,
  372.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x0030, 0xA832);
  373.  
  374.  
  375.  
  376. #if defined(__MWERKS__) && TARGET_CPU_68K
  377.     #pragma pop
  378. #endif
  379.  
  380.  
  381. #if PRAGMA_STRUCT_ALIGN
  382.     #pragma options align=reset
  383. #elif PRAGMA_STRUCT_PACKPUSH
  384.     #pragma pack(pop)
  385. #elif PRAGMA_STRUCT_PACK
  386.     #pragma pack()
  387. #endif
  388.  
  389. #ifdef PRAGMA_IMPORT_OFF
  390. #pragma import off
  391. #elif PRAGMA_IMPORT
  392. #pragma import reset
  393. #endif
  394.  
  395. #ifdef __cplusplus
  396. }
  397. #endif
  398.  
  399. #endif /* __GXLAYOUT__ */
  400.  
  401.